<?php 
/**
 * 后台管理员管理
 */
class AdminUserController extends BaseController{
    
    public function login(){
        
        $username = $this->getParamString('username');
        $password = $this->getParamString('password');
        
        //密码加密
        $key = Common::getConfig('passEncrypt');
        $passwdHash = Helper_String::password_hash($password, $key);

        
        $userInfo = User_Info::getUserInfo($username, $passwdHash);
      
        if (empty($userInfo)) {
            throw new AppException(3001);
        }
        $_SESSION['adminName'] = $userInfo['name'];
        $_SESSION['adminUid'] = $userInfo['uId'];

         Helper_Url::redirect('Admin.php?con=Admin&act=main');
        
    }
    
    
}


